package model.pojo;

import java.sql.ResultSet;

import models.util.MySqlDataAccessHelper;

public class AcAccountMenu {
	private String iDMenu;
	private String menuLink;
	private String menuName;
	private String description;
	public String getIDMenu() {
		return iDMenu;
	}
	public void setIDMenu(String iDMenua) {
		iDMenu = iDMenua;
	}
	public String getMenuLink() {
		return menuLink;
	}
	public void setMenuLink(String menuLinka) {
		menuLink = menuLinka;
	}
	public String getMenuName(String lang) {
		MySqlDataAccessHelper mysql = new MySqlDataAccessHelper();
		try {
			mysql.open();
			String sql="select "+lang+" as MenuName " +
					"from admin.ac_accountmenu, admin.configlang " +
					"where admin.ac_accountmenu.IDMenu=admin.configlang.LangID " +
					"and admin.ac_accountmenu.IDMenu='"+this.iDMenu+"' ";
			ResultSet rs = mysql.executeQuery(sql);
			if(rs.next()){
				menuName=rs.getString("MenuName");
			}
			rs.close();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			mysql.close();
		}
			
		return menuName;
	}
	public void setMenuName(String menuNamea) {
		menuName = menuNamea;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String descriptiona) {
		description = descriptiona;
	}
	
	
}
